package com.example.gss.mapper;

import com.example.gss.entity.ScholarshipApplication;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ScholarshipApplicationMapper {
    /**
     * 根据ID查询奖学金申请
     */
    ScholarshipApplication selectById(String applicationId);

    /**
     * 查询所有奖学金申请
     */
    List<ScholarshipApplication> selectAll();

    /**
     * 根据学生ID查询奖学金申请
     */
    List<ScholarshipApplication> selectByStudentId(@Param("studentId") String studentId);

    /**
     * 根据奖学金ID查询申请
     */
    List<ScholarshipApplication> selectByScholarshipId(@Param("scholarshipId") String scholarshipId);

    /**
     * 根据状态查询申请
     */
    List<ScholarshipApplication> selectByStatus(@Param("status") String status);

    /**
     * 根据学生ID和奖学金ID查询申请
     */
    ScholarshipApplication selectByStudentIdAndScholarshipId(@Param("studentId") String studentId, 
                                                           @Param("scholarshipId") String scholarshipId);

    /**
     * 插入奖学金申请
     */
    int insert(ScholarshipApplication application);

    /**
     * 更新奖学金申请
     */
    int update(ScholarshipApplication application);

    /**
     * 删除奖学金申请
     */
    int delete(String applicationId);
}